using System.Collections;
using Rdl;

namespace GTame.ReportParser
{

    public class SortByType
    {

        private Rdl.SortByTypeDirection _Direction;
        private string _SortExpression;

        public Rdl.SortByTypeDirection Direction
        {
            get
            {
                return _Direction;
            }
            set
            {
                _Direction = value;
            }
        }

        public string SortExpression
        {
            get
            {
                return _SortExpression;
            }
            set
            {
                _SortExpression = value;
            }
        }

        public SortByType()
        {
        }

        public Rdl.SortByType Write()
        {
            Rdl.SortByType sortByType = new Rdl.SortByType();
            System.Collections.ArrayList arrayList = new System.Collections.ArrayList();
            arrayList.Add(_Direction);
            if (_SortExpression != null)
                arrayList.Add(_SortExpression);
            sortByType.Items = arrayList.ToArray();
            arrayList = null;
            return sortByType;
        }

    } // class SortByType

}

